package com.daniu101.productbargan.controller;


import com.daniu101.productbargan.service.IVercodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value = "/vercode")
public class VercodeController {

    //测试连接Mysql
    @Autowired
    private IVercodeService vercodeService;

    @ResponseBody
    @RequestMapping(value = "/send",method = RequestMethod.POST)
    public String sendVercode(String phone){
        //phone=手机 or 邮箱

        return vercodeService.inVerCode(phone);
    }

}
